#ifndef __AUDIO_PLAYER__
#define __AUDIO_PLAYER__

#include <dshow.h>

namespace Audio
{
	class AudioPlayer
	{
	public:

		AudioPlayer();
		~AudioPlayer();

		void Init();

		void Play(const char* fileName);

		// volume percent from 0 to 100 %.
		void SetVolume(int volumePercent);
		int GetVolume() const;

		// Change volume by step
		void VolumeUp();
		void VolumeDown();

		// _changeStep accessor
		int GetChangeStep() const { return _changeStep; }
		void SetChangeStep(int value) { _changeStep = value; }

	private:

		long TranslatePercentsToVolume(int volumePercent) const;
		int TranslateVolumeToPercents(long volume) const;
		
	private:

		static const int s_defaultChangeStep = 1;
		int _changeStep;
		
		IGraphBuilder*	_pGraph;
		IMediaControl*	_pControl;
		IMediaEvent*	_pEvent;
		IBasicAudio*	_pAudio;
	
	};
}

#endif